﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using iss.sg4210.se18.team6s.jass.DAL.DataAccess.Utility;

namespace iss.sg4210.se18.team6s.jass.DAL
{
    [MetadataType(typeof(AdvertisementMetaData))]
    public partial class Advertisement
    {
    }

    [MetadataType(typeof(AdvertisementSearchLogMetaData))]
    public partial class AdvertisementSearchLog
    {
    }

    [MetadataType(typeof(AdvertisementTypeMetaData))]
    public partial class AdvertisementType
    {
    }

    [MetadataType(typeof(AdvertisementViewLogMetaData))]
    public partial class AdvertisementTypeViewLog
    {
    }

    public class AdvertisementMetaData
    {
        #region Primitive Properties

        [Required]
        public object Title
        {
            get;
            set;
        }

        public object Description
        {
            get;
            set;
        }

        [Required]
        [DisplayName("Experience In Years")]
        public object ExperienceInYears
        {
            get;
            set;
        }

        [DisplayName("Salary From")]
        public object SalaryFrom
        {
            get;
            set;
        }

        [DisplayName("Salary To")]
        public object SalaryTo
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.Date)]
        [DisplayName("Start Date")]
        [DateStart(ErrorMessage = "Date cannot be less than today's date!")]
        public object StartDate
        {
            get;
            set;
        }

        [Required]
        [DisplayName("Location")]
        public object GeoAreaId
        {
            get;
            set;
        }

        [Required]
        [DisplayName("Company")]
        public object CompanyId
        {
            get;
            set;
        }

        [DisplayName("WithDrawn")]
        public object IsWithDrawn
        {
            get;
            set;
        }

        [DisplayName("FulFilled")]
        public object IsFulFilled
        {
            get;
            set;
        }

        [Required]
        [DisplayName("Advertisement Type")]
        public object AdvertisementTypeId
        {
            get;
            set;
        }

        [Required]
        [DisplayName("User")]
        public object UserId
        {
            get;
            set;
        }

        #endregion
    }

    public class AdvertisementSearchLogMetaData
    {
        #region Primitive Properties
        [Required]
        [DisplayName("Advertisement")]
        public object AdvertisementId
        {
            set;
            get;
        }

        [Required]
        [DisplayName("Search TimeStamp")]
        public object SearchTimeStamp
        {
            set;
            get;
        }

        [Required]
        [DisplayName("User")]
        public object UserId
        {
            set;
            get;
        }

        #endregion
    }

    public class AdvertisementTypeMetaData
    {
        #region Primitive Properties
        [Required]
        public object Type
        {
            set;
            get;
        }

        [Required]
        public object Cost
        {
            set;
            get;
        }

        #endregion
    }

    public class AdvertisementViewLogMetaData
    {
        #region Primitive Properties
        [Required]
        [DisplayName("Advertisement")]
        public object AdvertisementId
        {
            set;
            get;
        }

        [Required]
        [DisplayName("View TimeStamp")]
        public object AdvertisementViewTimeStamp
        {
            set;
            get;
        }

        [Required]
        [DisplayName("User")]
        public object UserId
        {
            set;
            get;
        }

        #endregion
    }
}
